3.201 \(\int \frac{x^2 (c+d x^2)}{a+b x^2} \, dx\)

Optimal. Leaf size=58 \[ \frac{x (b c-a d)}{b^2}-\frac{\sqrt{a} (b c-a d) \tan ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a}}\right )}{b^{5/2}}+\frac{d x^3}{3 b} \]

[Out]

((b*c - a*d)*x)/b^2 + (d*x^3)/(3*b) - (Sqrt[a]*(b*c - a*d)*ArcTan[(Sqrt[b]*x)/Sqrt[a]])/b^(5/2)

________________________________________________________________________________________

Rubi [A]  time = 0.034077, antiderivative size = 58, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 20, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.15, Rules used = {459, 321, 205} \[ \frac{x (b c-a d)}{b^2}-\frac{\sqrt{a} (b c-a d) \tan ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a}}\right )}{b^{5/2}}+\frac{d x^3}{3 b} \]

Antiderivative was successfully verified.

[In]

Int[(x^2*(c + d*x^2))/(a + b*x^2),x]

[Out]

((b*c - a*d)*x)/b^2 + (d*x^3)/(3*b) - (Sqrt[a]*(b*c - a*d)*ArcTan[(Sqrt[b]*x)/Sqrt[a]])/b^(5/2)

Rule 459

Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> Simp[(d*(e*x)^(m
+ 1)*(a + b*x^n)^(p + 1))/(b*e*(m + n*(p + 1) + 1)), x] - Dist[(a*d*(m + 1) - b*c*(m + n*(p + 1) + 1))/(b*(m +
 n*(p + 1) + 1)), Int[(e*x)^m*(a + b*x^n)^p, x], x] /; FreeQ[{a, b, c, d, e, m, n, p}, x] && NeQ[b*c - a*d, 0]
 && NeQ[m + n*(p + 1) + 1, 0]

Rule 321

Int[((c_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[(c^(n - 1)*(c*x)^(m - n + 1)*(a + b*x^n
)^(p + 1))/(b*(m + n*p + 1)), x] - Dist[(a*c^n*(m - n + 1))/(b*(m + n*p + 1)), Int[(c*x)^(m - n)*(a + b*x^n)^p
, x], x] /; FreeQ[{a, b, c, p}, x] && IGtQ[n, 0] && GtQ[m, n - 1] && NeQ[m + n*p + 1, 0] && IntBinomialQ[a, b,
 c, n, m, p, x]

Rule 205

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]*ArcTan[x/Rt[a/b, 2]])/a, x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rubi steps

\begin{align*} \int \frac{x^2 \left (c+d x^2\right )}{a+b x^2} \, dx &=\frac{d x^3}{3 b}-\frac{(-3 b c+3 a d) \int \frac{x^2}{a+b x^2} \, dx}{3 b}\\ &=\frac{(b c-a d) x}{b^2}+\frac{d x^3}{3 b}-\frac{(a (b c-a d)) \int \frac{1}{a+b x^2} \, dx}{b^2}\\ &=\frac{(b c-a d) x}{b^2}+\frac{d x^3}{3 b}-\frac{\sqrt{a} (b c-a d) \tan ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a}}\right )}{b^{5/2}}\\ \end{align*}

Mathematica [A]  time = 0.0409964, size = 57, normalized size = 0.98 \[ \frac{x (b c-a d)}{b^2}+\frac{\sqrt{a} (a d-b c) \tan ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a}}\right )}{b^{5/2}}+\frac{d x^3}{3 b} \]

Antiderivative was successfully verified.

[In]

Integrate[(x^2*(c + d*x^2))/(a + b*x^2),x]

[Out]

((b*c - a*d)*x)/b^2 + (d*x^3)/(3*b) + (Sqrt[a]*(-(b*c) + a*d)*ArcTan[(Sqrt[b]*x)/Sqrt[a]])/b^(5/2)

________________________________________________________________________________________

Maple [A]  time = 0.003, size = 68, normalized size = 1.2 \begin{align*}{\frac{d{x}^{3}}{3\,b}}-{\frac{adx}{{b}^{2}}}+{\frac{cx}{b}}+{\frac{{a}^{2}d}{{b}^{2}}\arctan \left ({bx{\frac{1}{\sqrt{ab}}}} \right ){\frac{1}{\sqrt{ab}}}}-{\frac{ac}{b}\arctan \left ({bx{\frac{1}{\sqrt{ab}}}} \right ){\frac{1}{\sqrt{ab}}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^2*(d*x^2+c)/(b*x^2+a),x)

[Out]

1/3*d*x^3/b-1/b^2*a*d*x+c*x/b+a^2/b^2/(a*b)^(1/2)*arctan(b*x/(a*b)^(1/2))*d-c/b*a/(a*b)^(1/2)*arctan(b*x/(a*b)
^(1/2))

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(d*x^2+c)/(b*x^2+a),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [A]  time = 1.53942, size = 277, normalized size = 4.78 \begin{align*} \left [\frac{2 \, b d x^{3} - 3 \,{\left (b c - a d\right )} \sqrt{-\frac{a}{b}} \log \left (\frac{b x^{2} + 2 \, b x \sqrt{-\frac{a}{b}} - a}{b x^{2} + a}\right ) + 6 \,{\left (b c - a d\right )} x}{6 \, b^{2}}, \frac{b d x^{3} - 3 \,{\left (b c - a d\right )} \sqrt{\frac{a}{b}} \arctan \left (\frac{b x \sqrt{\frac{a}{b}}}{a}\right ) + 3 \,{\left (b c - a d\right )} x}{3 \, b^{2}}\right ] \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(d*x^2+c)/(b*x^2+a),x, algorithm="fricas")

[Out]

[1/6*(2*b*d*x^3 - 3*(b*c - a*d)*sqrt(-a/b)*log((b*x^2 + 2*b*x*sqrt(-a/b) - a)/(b*x^2 + a)) + 6*(b*c - a*d)*x)/
b^2, 1/3*(b*d*x^3 - 3*(b*c - a*d)*sqrt(a/b)*arctan(b*x*sqrt(a/b)/a) + 3*(b*c - a*d)*x)/b^2]

________________________________________________________________________________________

Sympy [A]  time = 0.444769, size = 90, normalized size = 1.55 \begin{align*} - \frac{\sqrt{- \frac{a}{b^{5}}} \left (a d - b c\right ) \log{\left (- b^{2} \sqrt{- \frac{a}{b^{5}}} + x \right )}}{2} + \frac{\sqrt{- \frac{a}{b^{5}}} \left (a d - b c\right ) \log{\left (b^{2} \sqrt{- \frac{a}{b^{5}}} + x \right )}}{2} + \frac{d x^{3}}{3 b} - \frac{x \left (a d - b c\right )}{b^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**2*(d*x**2+c)/(b*x**2+a),x)

[Out]

-sqrt(-a/b**5)*(a*d - b*c)*log(-b**2*sqrt(-a/b**5) + x)/2 + sqrt(-a/b**5)*(a*d - b*c)*log(b**2*sqrt(-a/b**5) +
 x)/2 + d*x**3/(3*b) - x*(a*d - b*c)/b**2

________________________________________________________________________________________

Giac [A]  time = 1.14221, size = 78, normalized size = 1.34 \begin{align*} -\frac{{\left (a b c - a^{2} d\right )} \arctan \left (\frac{b x}{\sqrt{a b}}\right )}{\sqrt{a b} b^{2}} + \frac{b^{2} d x^{3} + 3 \, b^{2} c x - 3 \, a b d x}{3 \, b^{3}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(d*x^2+c)/(b*x^2+a),x, algorithm="giac")

[Out]

-(a*b*c - a^2*d)*arctan(b*x/sqrt(a*b))/(sqrt(a*b)*b^2) + 1/3*(b^2*d*x^3 + 3*b^2*c*x - 3*a*b*d*x)/b^3